package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MemberWechatMiniProgramMapper;
import com.ruoyi.system.domain.MemberWechatMiniProgram;
import com.ruoyi.system.service.IMemberWechatMiniProgramService;

/**
 * 会员微信小程序配置，定义小程序类型、推送范围及消息开关Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class MemberWechatMiniProgramServiceImpl implements IMemberWechatMiniProgramService
{
    @Autowired
    private MemberWechatMiniProgramMapper memberWechatMiniProgramMapper;

    /**
     * 通过id查询会员微信小程序配置
     *
     * @param id 会员微信小程序配置主键
     * @return 会员微信小程序配置
     */
    @Override
    public MemberWechatMiniProgram selectMemberWechatMiniProgramById(Long id)
    {
        return memberWechatMiniProgramMapper.selectMemberWechatMiniProgramById(id);
    }

    /**
     * 查询会员微信小程序配置列表
     *
     * @param memberWechatMiniProgram 会员微信小程序配置
     * @return 会员微信小程序配置
     */
    @Override
    public List<MemberWechatMiniProgram> selectMemberWechatMiniProgramList(MemberWechatMiniProgram memberWechatMiniProgram)
    {
        return memberWechatMiniProgramMapper.selectMemberWechatMiniProgramList(memberWechatMiniProgram);
    }

    /**
     * 新增会员微信小程序配置
     *
     * @param memberWechatMiniProgram 会员微信小程序配置
     * @return 结果
     */
    @Override
    public int insertMemberWechatMiniProgram(MemberWechatMiniProgram memberWechatMiniProgram)
    {
        return memberWechatMiniProgramMapper.insertMemberWechatMiniProgram(memberWechatMiniProgram);
    }

    /**
     * 修改会员微信小程序配置
     *
     * @param memberWechatMiniProgram 会员微信小程序配置
     * @return 结果
     */
    @Override
    public int updateMemberWechatMiniProgram(MemberWechatMiniProgram memberWechatMiniProgram)
    {
        return memberWechatMiniProgramMapper.updateMemberWechatMiniProgram(memberWechatMiniProgram);
    }

    /**
     * 通过id批量批量删除会员微信小程序配置信息
     *
     * @param ids 需要删除的会员微信小程序配置主键
     * @return 结果
     */
    @Override
    public int deleteMemberWechatMiniProgramByIds(Long[] ids)
    {
        return memberWechatMiniProgramMapper.deleteMemberWechatMiniProgramByIds(ids);
    }

    /**
     * 通过id单个删除会员微信小程序配置信息
     *
     * @param id 会员微信小程序配置主键
     * @return 结果
     */
    @Override
    public int deleteMemberWechatMiniProgramById(Long id)
    {
        return memberWechatMiniProgramMapper.deleteMemberWechatMiniProgramById(id);
    }
}
